<%--
  Created by IntelliJ IDEA.
  User: GL62
  Date: 2019/10/21
  Time: 16:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h1 align="center">账户管理列表</h1>
<table border="1" align="center">
    <tr align="center">
        <td>用户名</td>
        <td>昵称</td>
        <td>手机</td>
        <td>地址</td>
        <td>操作</td>
    </tr>
    <c:forEach items="${userList}" var="u">
        <tr>
            <td>${u.username}</td>
            <td>${u.nickname}</td>
            <td>${u.mobile}</td>
            <td>${u.address}</td>
            <td><a href="/delete.do?id=${u.id}">删除</a></td>
        </tr>
    </c:forEach>
    <tr>
        <td colspan="5" align="center">
            <span>共${info.total}条记录</span>
            <a href="/queryAll.do?pageIndex=${info.firstPage}">首页</a>
            <c:if test="${info.hasPreviousPage}">
                <a href="/queryAll.do?pageIndex=${info.prePage}">上一页</a>
            </c:if>
            <c:if test="${info.hasNextPage}">
                <a href="/queryAll.do?pageIndex=${info.nextPage}">下一页</a>
            </c:if>
            <a href="/queryAll.do?pageIndex=${info.lastPage}">末页</a>
            <span>第${info.pageNum}/${info.pages}页</span>
        </td>
    </tr>
    <tr>
        <td align="center"><button><a href="/jsp/add.jsp">添加数据</a></button></td>
    </tr>
</table>
</body>
</html>
